package com.tjetc.domian;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serial;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {
    @Serial
    private static final long serialVersionUID = 1040637717700587497L;
    private Integer id;

    private String username;

    private String password;

    private int residentId;

    public User(String username, String password) {
        this.username = username;
        this.password = password;
    }
    public User( String username, String password,  int residentId){
        this.username = username;
        this.password = password;
        this.residentId = residentId;
    }
    public int setResidentId(Integer id) {
        return residentId = id;
    }

    public int getResidentId() {
        return residentId;
    }
}